package br.com.pucrs.aa;

import br.com.pucrs.aa.environment.StreetEnvironment;
import br.com.pucrs.aa.environment.StreetEnvironment1;
import br.com.pucrs.aa.environment.StreetEnvironment2;
import br.com.pucrs.aa.environment.StreetEnvironment3;

public class StreetFactory {

	public static StreetModel loadStreet() {
		PropertiesLoader propertiesLoader = new PropertiesLoader();
		StreetEnvironment streetEnvironment = null;
		switch (propertiesLoader.getEnvironment()) {
		case 1:
			streetEnvironment = new StreetEnvironment1(propertiesLoader.getTrafficIntensity());
			break;
		case 2:
			streetEnvironment = new StreetEnvironment2(propertiesLoader.getTrafficIntensity());
			break;
		case 3:
			streetEnvironment = new StreetEnvironment3(propertiesLoader.getTrafficIntensity());
			break;
		}
		return streetEnvironment.getModel();
	}
}